﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using QLDKINTERNET.Public;
using QLDKINTERNET.BLL;

namespace WindowsFormsApplication1
{
    public partial class frm_Login : Form
    {
        public NguoiDungPublic nguoidungpub = new NguoiDungPublic();
        public frm_Login()
        {
            InitializeComponent();
        }

        
        private void btn_Dong_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void btn_DangNhap_Click(object sender, EventArgs e)
        {
            nguoidungpub.Username = txt_Username.Text;
            nguoidungpub.Pass = txt_Pass.Text;
            NguoiDungBLL nguoidung = new NguoiDungBLL();
            if (nguoidung.DangNhap(nguoidungpub) == true)
            {
                this.Hide();
            }
            else
            {
                MessageBox.Show("Dang Nhap That Bai");
            }
        }
    }
}
